@extends('home.m.m1.public.public')

@section('content')
    <div class="met-column-nav bordernone">
        <div class="container">
            <div class="row">
                <div class="sidebar-tile">
                    <ul class="met-column-nav-ul invisible-xs">
                        <li><a href="{{ route('sort_all','product') }}" class="link" title="全部">全部</a></li>
                        @foreach($sorts['product'] as $value)
                            <li>
                                <a href="{{ route('sort',['product',$value['id']]) }}" title="{{ $value['name'] }}"
                                   class="link ">{{ $value['name'] }}</a>
                            </li>
                        @endforeach
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="met-product animsition type-1">
        <div class="container">
            <ul class="blocks-2 blocks-sm-2 blocks-md-4 blocks-xlg-4  met-page-ajax met-grid" id="met-grid"
                data-scale='1'>
                @if(!empty($infos))
                    @foreach($infos as $value)
                        <li class=" shown">
                            <div class="widget widget-shadow">
                                <figure class="widget-header cover">
                                    <a href="{{ route('info',['product',$value['id']]) }}" title="{{ $value['name'] }}"
                                       target='_self'>
                                        <img class="cover-image" src="{{ $value['image'] }}" alt="{{ $value['name'] }}"
                                             style='height:200px;'>
                                    </a>
                                </figure>
                                <h4 class="widget-title">
                                    <a href="{{ route('info',['product',$value['id']]) }}" title="{{ $value['name'] }}"
                                       target='_self'>{{ $value['name'] }}</a>
                                </h4>
                            </div>
                        </li>
                    @endforeach
                @else
                    <div class="noinfo">暂无资料!</div>
                @endif
            </ul>
            <div class='met_pager'>
                {{ $infos->links() }}
            </div>
        </div>
    </div>
@endsection